package com.ayne.network.client;

import com.ayne.network.client.listener.NetworkListener;
import com.ayne.network.packets.Registration;
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryonet.Client;

public class Clientframe {
	
	private Client client;
	
	public Clientframe () {
		client = new Client();
		registerPackets();
		
		NetworkListener networkListener = new NetworkListener();
		networkListener.init();
		client.addListener(networkListener);
	}
	
	public void registerPackets() {
		Kryo kryo = client.getKryo();
		Registration.registerPackets(kryo);
	}
}
